<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
 ?>

<?= Html::cssFile('./css/course/bootstrap.css')?>
<?= Html::cssFile('./css/course/common.css')?>
<?= Html::cssFile('./css/course/bootstrap-extends.css')?>
<?= Html::cssFile('./css/course/class-default.css')?>
<?= Html::cssFile('./css/course/web.css')?>
<?= Html::cssFile('./css/course/member.css')?>
<?= Html::cssFile('./css/course/font-awesome.min.css')?>


  <div id="content-container" class="container">





<div class="row row-12">
  <div class="col-md-12">
    <div class="panel panel-default  course-header">
      <div class="panel-body clearfix">
        <a href="http://localhost/eudsoho/web/app.php/course/2">
            <?php if($course['course_thumb']){?>
                <img class="picture" src="<?php echo 'http://files.bwphp.com/file/image/show/110/60?path='.$course['course_thumb']?>">
            <?php }else{?>
            <img class="picture" src="./css/course/coursePicture">
            <?php }?>
        </a>

        <h1 class="title"><a href="http://localhost/eudsoho/web/app.php/course/2"><?php echo $course['course_name']; ?></a>
                      <span class="label label-warning ">
                          <?php if ($course['status'] == 0) {
                        echo '未发布';
                      }elseif ($course['status'] == 1) {
                        echo "已发布";
                      }elseif ($course['status'] == 2) {
                        echo "已关闭";
                      } ?></span>
                  </h1>

        <div class="teachers">
                      教师：
             <a href="http://localhost/eudsoho/web/app.php/course/2/manage/base#modal" data-toggle="modal" data-url="/eudsoho/web/app.php/course/2/teacher/1"><?php echo $course['teacher']['teacher_name']  ?></a>
                              </div>

        <!-- <div class="toolbar hidden-xs hidden-lt-ie8">


            <div class="btn-group">
              <button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">预览 <span class="caret"></span></button>
              <ul class="dropdown-menu pull-right">
                  <li><a href="http://localhost/eudsoho/web/app.php/course/2?previewAs=member" target="_blank">作为 已购买用户</a></li>
                  <li><a href="http://localhost/eudsoho/web/app.php/course/2?previewAs=guest" target="_blank">作为 未购买用户</a></li>
              </ul>
            </div>

                          <div class="btn-group">
                <button class="btn btn-success btn-sm course-publish-btn" data-url="/eudsoho/web/app.php/course/2/manage/publish">发布课程</button>
              </div>

                  </div> -->
      </div>
    </div>


  </div>
</div>

<div class="row">
  <div class="col-md-3">
                <div class="panel panel-default">
        <div class="panel-body">
          <div class="list-group-panel">

			<?php echo $this->render('_leftnav') ?>

      </div>
      </div>
  <div class="col-md-9">

<div class="panel panel-default panel-col">
  <div class="panel-heading">详细信息</div>
  <div class="panel-body">
     <?php
      $form = ActiveForm::begin([
                    'options' => ['class' => 'form-horizontal',
                    'id'=>'course-base-form'],
                    'method'=>'post',
                                    ]);
                                ?>

      <?= $form->field($model, 'describe', ['template'=>'
        <div class="form-group">
          <div class="col-md-2 control-label">{label}</div>
          <div class="col-md-8 controls" style="width:300px">
           {input}{error}
        </div>
      </div>
      '])->textarea(['rows'=>3,'name'=>'describe','data-widget-cid'=>"widget-2",'data-explain'=>""]) ?>
      <input type="hidden" name="course_id" value="<?php echo $course['course_id'] ?>">

      <?= $form->field($model, 'result', ['inputOptions'=>['placeholder'=>''],'template'=>'<div class="form-group dynamic-collection" id="course-goals-form-group" data-widget-cid="widget-0">
        <div class="col-md-2 control-label">{label}</div>
        <div class="col-md-8 controls">
          <ul class="list-group sortable-list" data-role="list" style="margin-bottom:10px;display:none;"></ul>
          <div class="input-group">
            {input}{error}
            <span class="input-group-btn">
            </span>
          </div>
         </div>
      </div>'])->textInput(['name'=>"result",'class'=>'form-control']) ?>
      <?= $form->field($model,'fit_crowd',['template'=>'
        <div class="form-group" id="course-audiences-form-group" data-widget-cid="widget-1">
        <div class="col-md-2 control-label">{label}</div>
        <div class="col-md-8 controls">
          <ul class="list-group sortable-list  dynamic-collection" data-role="list" style="margin-bottom:10px;display:none;"></ul>
          <div class="input-group">
            {input}{error}
            <span class="input-group-btn">
            </span>
          </div>
        </div>
      </div>'])->textInput(['class'=>'form-control','name'=>'fit_crowd']) ?>

      <div class="form-group">
        <div class="col-md-8 col-md-offset-2 controls">
            <button class="btn btn-fat btn-primary" id="course-create-btn" type="submit">保存</button>
        </div>
      </div>


    <?php ActiveForm::end(); ?>
  </div>
</div>

  </div>
</div>

  </div><!-- /container -->








